﻿namespace AVCUMPlatform.BLL.Interface
{
    public partial interface IBaseBLL<T>
    {
        /// <summary>
        /// 增加
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        bool Add(T t);


        int AddReturnAutoId(T t);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool Delete(List<int> ids);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        bool Update(T t);

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        T Get(int id);

        /// <summary>
        /// 查询列表
        /// </summary>
        /// <param name="count">总数</param>
        /// <param name="page">页码</param>
        /// <param name="per_page">分页大小</param>
        /// <returns></returns>
        List<T> GetList(out int count, int page = 1, int per_page = 20);

        /// <summary>
        /// 获取所有
        /// </summary>
        /// <returns></returns>
        List<T> GetAll();
    }
}